#!/usr/bin/env node

let userName = process.argv[2];
let passWord = process.argv[3];

console.log('user name:', userName);
console.log('password:', passWord);

// const msg = `${userName}:${passWord}`;

// console.log('msg:', msg);

// const buf = Buffer.from(msg);

// console.log('base64:', buf.toString('base64'));

let buf = new Buffer(userName + ':' + passWord);
console.log("user name and password:", buf.toString());
//转换为base64编码
console.log("user name and password with base64:", buf.toString('base64'))
//转换为16进制编码
console.log("user name and password with hex:", buf.toString('hex'));

